Help for functions and procedures in drawbox.e

 

  drawbox.e is a collection of procedures and functions to draw boxes, borders, create

  text, message, and input boxes.  Also include is a routine to draw random dots on

  a screen to create a starlike effect.

 

 

procedures and functions in drawbox.e

 

CenterText

DrawBorder

Drawbox

InputBox

Msgbox

Msgbox_at

PrintStatusLine

Randomdots

TextBox

TextBox_at

 

 

 

                                   CenterText

 

 Syntax:      include drawbox.e

              CenterText({i1, i2, i3, s})

 

       where: i1 is an integer representing the starting row

              i2 is an integer representing the starting column

              i3 is an integer representing the ending column

              s is a sequence with text

 

 

 Description: Center text on a line, or lines

              Text is centered between specified startcol and endcol

 

 

 Example:

              sequence text

              text = “Your message here”

 

              CenterText({5,10,50,text})

 

 

                                   DrawBorder

 

 Syntax:      include drawbox.e

              DrawBorder ({i1, i2, i3, i4, i5, i6, i7})

 

       where: i1 is an integer representing the starting row

              i2 is an integer representing the starting col

              i3 is an integer representing the ending   row

              i4 is an integer representing the ending   col

              i5 is an integer representing the foreground color

              i6 is an integer representing the background color

              i7 is an integer representing the border color

 

 Description: Draw a solid border at a specified starting row and column,

              i1 and i2, and ending row and column, i3 and i4,

              with foreground color, i5, and background color i6, and

              a specified border color, i7.

 

 Example:

              Drawborder({1, 1, 15, 50,WHITE, BLUE, BROWN})

 

 

See also:        Drawbox

 

 

                                    Drawbox

 

Syntax:       include drawbox.e

              DrawBorder ({i1, i2, i3, i4, i5, i6, i7})

 

       where: i1 is an integer representing the starting row

              i2 is an integer representing the starting col

              i3 is an integer representing the ending   row

              i4 is an integer representing the ending   col

              i5 is an integer representing the foreground color

              i6 is an integer representing the background color

              i7 is an integer representing the shadow

 

 Description: Draw a box, with a border and an optional shadow, at

              specified starting row and column, s_row and s_col, and

              ending row and column, e_row and e_col, with foreground

              color, fg, and background color bg, and optional shadow

 

 

 Example:

 

              Drawbox({1, 1, 15, 50,WHITE, BLUE, 1})

             -- Box with a shadow

 

              Drawbox({1, 1, 15, 50,WHITE, BLUE, 0})

             -- Box without a shadow

 

 

 See also:        DrawBorder

 

                                   InputBox

 

 Syntax:      include drawbox.e

              s2 = InputBox(s1)

 

     s1 is a sequence representing the text displayed as a prompt

     s2 is a sequence returned from the function InputBox

 

 Description:  An input box is centered on the screen for entering data.

 

 

Example:

              sequence response

              response = InputBox(“Enter choice : ”)

 

 See also:        TextBox, TextBox_at

 

 

                                   MsgBox

 

 Syntax:      include drawbox.e

              MsgBox(s)

 

      where: s is the text to display.

 

Description: Displays text in a message box, centered on the screen,

             with an OK message.  To clear the message box, press Enter or ESC.

 

Example:

              MsgBox{“Press Enter to clear this box”)

 

See also:        TextBox, TextBox_at, Msgbox_at

 

                                   MsgBox_at

 

 Syntax:      include drawbox.e

              MsgBox_at({i1, i2, s1})

 

      where: i1 and i2 are the row an column specified for the message to start,

 s1 is the text to display.

 

Description: Displays text in a message box on the screen, at the location on the

 screen specified, with an OK message.  To clear the message box,

             press Enter or ESC.

 

Example:

             MsgBox_at({2, 10, “Press Enter to clear this box”})

 

See also:        TextBox, TextBox_at, Msgbox

 

                                   PrintstatusLine

 

 Syntax:      include drawbox.e

              PrintStatusLine(s1, s2)

 

      where: s1 is a sequence representing the status line, s2 is a sequence

             with strings that are highlighted on the status line.

 

 

Description:  Put a status line at the bottom of a screen, and highlight specified

             Letters or words in the status line.

 

Example:

              sequence StatusLine, Highlights

              StatusLine = “F1 Previous  F2 Next  ESC Exit”

              Highlights = {“F1”, “F2”, “ESC”}

 

              PrintStatusLine(StatusLine, Highlights)

 

 

 

                                   RandomDots

 

 Syntax:      include drawbox.e

              RandomDots(n)

 

       where: n is an integer representing number of dots desired on screen at

              random positions

 

Description:  Puts random dots on the screen. Integer n specifies the number of dots.

 

 Example:

 

 text_color(WHITE) 

 bk_color(BLUE)

 clear_screen()

 

 RandomDots(100)      -- draws 100 random dots on the screen

 

                                   TextBox

 

 Syntax:      include drawbox.e

              TextBox

 

Description:  Displays a text box, centered on the screen.

 

Example:

              TextBox(“This is a centered text message”)

 

See also:        TextBox_at, Msgbox, Msgbox_at

 

                                   TextBox_at

 

 Syntax:      include drawbox.e

              TextBox_at

 

Description:  Displays a text box, at the position on the screen specified.

 

Example:

              TextBox_at({2,10,”This text starts at row 5 col 10”})

 

See also:        TextBox, Msgbox, Msgbox_at